import {DeviceTabs, Info} from '@site/src/react-luma';

# DeviceInfo

The `device.info` field holds a small `DeviceInfo` object that provides information about the device, such as driver, GPU, shading language etc.

## Usage

```typescript
import {Device} from '@luma.gl/core';

const device: Device = ...;
console.log(device.info);
if (device.info.gpu === 'nvidia') {
   ...
}
```

## Device

<DeviceTabs />

| Field                    | This Browser                        | Description                                                |
| ------------------------ | ----------------------------------- | ---------------------------------------------------------- |
| `type`                   | <Info f="type" />                   | Device type `webgpu`, `webgl2` or `webgl`                  |
| `vendor`                 | <Info f="vendor" />                 | GPU vendor                                                 |
| `renderer`               | <Info f="renderer" />               | GPU Driver                                                 |
| `version`                | <Info f="version" />                | Driver version                                             |
| `gpu`                    | <Info f="gpu" />                    | `apple`, `intel`, `nvidia`, `amd`, `software` or `unknown` |
| `gpuType`                | <Info f="gpuType" />                | `discrete`, `integrated`, `cpu` or `unknown`               |
| `gpuBackend`             | <Info f="gpuBackend" />             | `metal`, `opengl`, `vulkan`, `d3d12`, ... or `unknown`     |
| `gpuArchitecture`        | <Info f="gpuArchitecture" />        | `common-3` on Apple                                        |
| `shadingLanguage`        | <Info f="shadingLanguage" />        | Shanding language `wgsl`, `glsl`                           |
| `shadingLanguageVersion` | <Info f="shadingLanguageVersion" /> | Shading language version GLSL 3.00 = 300, GLSL 1.00 = 100) |

- Note that the Chrome browser only exposes limited device information by default. Set the [chrome://flags/#enable-webgpu-developer-features](chrome://flags/#enable-webgpu-developer-features) flag to see more WebGPU info.
